package com.dzx.design.structural.proxy.dynamicproxy;

import com.dzx.design.structural.proxy.staticproxy.IOrderService;
import com.dzx.design.structural.proxy.staticproxy.Order;
import com.dzx.design.structural.proxy.staticproxy.OrderServiceImpl;

/**
 * @author dzx
 * @ClassName:
 * @Description: 动态代理
 * @date 2019年08月09日 10:09:25
 */
public class Test {

    public static void main(String[] args) {
        Order order = new Order();
        order.setUserId(1);
        IOrderService orderServiceDynamicProxy = (IOrderService) new OrderServiceDynamicProxy(new OrderServiceImpl()).bind();
        orderServiceDynamicProxy.saveOrder(order);
    }


}
